<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title><?php echo $title;?></title>
    <!-- 设置缩放 -->
    <meta name="viewport" content="minimal-ui,width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <!-- IOS中禁用将数字识别为电话号码/忽略Android平台中对邮箱地址的识别 -->
    <meta name="format-detection" content="telephone=no" />
    <!-- windows phone 点击无高光 -->
    <meta name="msapplication-tap-highlight" content="no" />
    <!-- icon -->
    <link rel="shortcut icon" href="<?php echo ADMIN_ICO_PIC;?>" type="image/x-icon" />
    <!-- css -->
    <link rel="stylesheet" type="text/css" href="<?php echo SYS_LINK;?>admin/css/login.css?v=<?php echo V_CSSJS;?>" />

    <style>
        .login{height:auto;left:60%}
        .webtitle{color:#fff;text-decoration:none;}
        <?php
        if(isset($loginPic) && $loginPic){
            echo '.login_body {background: #333844 url('.$loginPic.') repeat center;background-size: cover;background-attachment: fixed;height: 100%;overflow: hidden;}';
        }
        ?>
        .message{background: #03adff;/*width: 319px;padding: 10px 10px 10px 10px;text-align: center;*/}
        .login_submit{background: #03adff;}
        .login_forget {color: #419eff;}

        @media only screen and (max-width:750px){
            .login{height:auto;left:50%}
        }
    </style>
</head>
<body class="login_body">

<div class="login">
    <div class="message"><?php echo isset($devKey) && $devKey === SYS_DEV_LOGIN_FLAG ? '<font color="#e54ca1">开发者模式-LOGIN</font>' : $title.'-LOGIN';?></div>
    <div id="darkbannerwrap"></div>

    <form action="<?php echo SYS_URL_PATH('admin_login_login');?>" method="post" onsubmit="return chkmanagelog(this)">
        <input type="hidden" name="manage_key" value="<?php echo $devKey;?>">
        <input name="manage_user" id="manage_user" placeholder="用户名" required="" type="text" class="login_input" maxlength="20">
        <input name="manage_pwd" id="manage_pwd" placeholder="密  码" required="" type="password" class="login_input" maxlength="20">
        <?php if(isset($verifyFlag) && $verifyFlag == 1){?>
        <input name="manage_code" id="manage_code" placeholder="验证码" required="" type="text" class="login_input code"><img src="" id="vercodeimg" />
        <?php } ?>
        <input value="登录" class="login_submit" type="submit">
        帮助
        <a onClick="layer.msg('请联系管理员');" class="login_forget">忘记密码</a>
    </form>

</div>

<div class="copyright"><a href="" class="webtitle">zhladmin后台</a>&nbsp;&nbsp;2020~<?php echo date('Y');?> © COPYRIGHT</div>

</body>
<script type="text/javascript" src="<?php echo SYS_LINK;?>admin/js/jquery.min.js?v=<?php echo V_CSSJS;?>"></script>
<script type="text/javascript" src="<?php echo SYS_LINK;?>plug/layer3.1.1/layer.js?v=<?php echo V_CSSJS;?>"></script>
<script language="javascript">
    var http_path = '<?php echo SYS_HOST;?>';
    var url_fix = '<?php echo SYS_URL_FIX;?>';

    function chkmanagelog(frm){
        if(!frm.manage_user.value){
            layer.msg("请输入用户名！");
            frm.manage_user.focus();
            return false;
        }else if(!frm.manage_pwd.value){
            layer.msg("请输入密码！");
            frm.manage_pwd.focus();
            return false;
        }else if(!frm.manage_pwd.value){
            layer.msg("请输入图形码！");
            frm.manage_code.focus();
            return false;
        }
        return true;
    }

    // 切换验证码
    $('#vercodeimg').click(function(){
        let randomNo = Math.floor(Math.random()*100+1);
        $('#vercodeimg').attr('src', http_path+'c_captcha_img/n/a_img_code/rr/'+randomNo+url_fix);
    });
    $('#vercodeimg').trigger('click');

</script>
</html>